package com.heima.article.config;

import com.heima.model.user.pojos.ApUser;

public class ApArticleThreadLocalUtil {
    private final static ThreadLocal<ApUser> USER_THREAD_LOCAL = new ThreadLocal<>();

    public static void setUser(ApUser user) {
        USER_THREAD_LOCAL.set(user);
    }

    public static ApUser getUser() {
        return USER_THREAD_LOCAL.get();
    }

    public static void clear() {
        USER_THREAD_LOCAL.remove();
    }
}
